﻿@model mvcForum.Web.ViewModels.MoveViewModel
@using mvcForum.Web.Helpers;
@{
	ViewBag.Title = ForumHelper.GetString("Moderate.Title", new { Name = Model.Forum.Name });

	Layout = Url.GetThemeBaseUrl() + "areas/forum/views/shared/forumlayout.cshtml";
}
<!-- Views/Moderate/Move.cshtml -->
	<span class="pull-right muted">@ForumHelper.GetString("CurrentTime", new object[] { DateTime.UtcNow })</span>

	<h2>@ForumHelper.GetString("Move.Heading")</h2>
	<hr />

	<div class="row">
		<div class="col-md-12">
			@using (Html.BeginForm("move", "moderate", FormMethod.Post, new { @class = "form-horizontal" })) {
	   foreach (Int32 id in Model.Topics.Select(t => t.Id)) {
				<input type="hidden" name="topics" value="@id" />
	   }
				<div class="form-group">
					<label for="destinationId" class="col-lg-2 control-label">@ForumHelper.GetString("Move.Destination")</label>
					<div class="col-lg-10">
						@Html.DropDownList("destinationId", ForumHelper.GetModerateForums(Model.Forum.Id), new { @class = "form-control" })
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="LeaveTopic">@ForumHelper.GetString("Move.LeaveTopics", null, "mvcForum.Web")</label>
					<div class="col-lg-10">
						<input type="checkbox" name="LeaveTopic" id="LeaveTopic" value="true" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-lg-10 col-lg-offset-2">
						<ul class="list-unstyled">
@foreach (var topic in Model.Topics) {
							<li>@topic.Title</li>
}
						</ul>
					</div>
				</div>
				<div class="form-group">
					<div class="col-lg-offset-2 col-lg-10">
						<button type="submit" class="btn btn-primary">@ForumHelper.GetString("Move.Submit")</button>
					</div>
				</div>
			}
		</div>
	</div>

@if (ForumHelper.Debug) {
<!-- For Selenium Test -->
<div id="forum_moderate_move" style="display: none;"></div>
}